﻿using System;
using Microsoft.TeamFoundation.VersionControl.Client;
namespace TfsCloudDeploy.Workflow.Core
{
    /// <summary>
    /// Stored the build label information.
    /// </summary>
    [Serializable]
    public class TargetBuildLabel
    {
        public string LabelName { get; set; }

        public override string ToString()
        {
            return string.Format("Label: {0}",
                string.IsNullOrWhiteSpace(LabelName) ?
                "Latest" :
                (LabelName == VersionSpec.Latest.DisplayString ? "Latest" : LabelName));
        }
    }
}
